<?php

function quail_server_template_browser_ctools_content_types() {
  return array(
    'single' => TRUE,
    'title' => t('Template Browser'),
    'icon' => 'ac_server.png',
    'description' => t('The template browser.'),
    'required context' => new ctools_context_required(t('Node'), 'node'),
    'category' => t('Node'),
    'render callback' => 'quail_server_template_browser_render',
  );
}

function quail_server_template_browser_render($subtype, $conf, $args, $context) {
	$block = new stdClass();
	module_load_include('inc', 'quail_server', 'quail_server.pages');
	drupal_add_css(drupal_get_path('module', 'quail_server').'/quail_server.css');
	$node = node_load($args[0]);
	$block->content = quail_server_template_browser($node);
	$block->title = 'Template Browser';
	return $block;
}